package test.controllers;

import javax.annotation.Resource;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import test.services.LoginService;

@Controller
public class HelloWorldController {

    @Resource(name = "loginService")
    LoginService loginService = null;

    @RequestMapping("/helloworld")
    public ModelAndView helloWord() {
        String message = "Hello World, Spring 3.0!";

//        int c = loginService.GetCount();
        
        LoginService l= new LoginService();
        int a= l.loginValidation("nilu", "nilu","general") ;
//        loginService.delete(1);
        message = message + " count is :::" + a;
        return new ModelAndView("success", "message", message);
    }
}
